package com.mezz.bones.im.logic.domain.entity;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * IM单聊消息-扩展信息记录表
 * </p>
 *
 * @author mezz
 * @since 2025-01-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "chat_private_message_info", autoResultMap = true)
@ApiModel(value="ChatPrivateMessageExt对象", description="IM单聊消息-扩展信息记录表")
public class ChatPrivateMessageInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "消息KEY，用于标识单条消息")
    private String msgKey;

    @ApiModelProperty(value = "消息内容，存储实际消息内容")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private JSONObject content;

    @ApiModelProperty(value = "消息扩展信息，存储消息的额外参数")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private JSONObject msgExtra;

    @ApiModelProperty("发送者用户ID")
    private String userId;

    @ApiModelProperty("接收者用户ID")
    private String peerId;

    @ApiModelProperty(value = "发送设备IP地址")
    private String userIp;

    @ApiModelProperty(value = "发送设备类型 miniapp|ios|android|pc")
    private String userDeviceType;

    @ApiModelProperty(value = "发送设备信息")
    private String userImei;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "1已删 0否")
    private Integer isDel;


}
